package com.jieli.bt.att.data.result

/**
 * OpResult
 * @author zqjasonZhong
 * @since 2024/7/31
 * @email zhongzhuocheng@zh-jieli.com
 * @desc 操作结果
 */
open class OpResult<T>(
    val op: Int,
    val code: Int = RES_FAILURE,
    val message: String = "",
    val data: T? = null
) {
    companion object {
        const val RES_SUCCESS = 0
        const val RES_FAILURE = 1
    }

    fun isSuccess(): Boolean = code == RES_SUCCESS
}
